<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<script src="/html/axios.min.js"></script>
<script>
    function $(elementId){
        return document.getElementById(elementId)
    }
    function add(){
        axios.get("/car/add",{
            params:{
                type:$('type').value,
                price:$('price').value,
                color:$('color').value
            }
        }).then(e => {
            var info = e.data;
            if (info == "ok"){
                location.href = "/html/car/index.html";
            }
        })
    }
</script>
<body>
    品牌:<input type="text" id="type"><br>
    价格:<input type="text" id="price"><br>
    颜色:<select id="color">
            <option>白色</option>
            <option>蓝色</option>
            <option>黑色</option>
        </select>
    <input type="button" value="提交" onclick="add()">
</body>
</html>